This repository was archived by the owner on Aug 26, 2021. It is now read-only.
Open
Conversation
Author
|
This ran for several hours and even though I'm using a commit that would have been current when the commit was made, I don't know if this was ever tested to work this way. Could have been I was just OOM. ARG ETEBASE_TAG=master
ARG ETESYNC_WEB_TAG=master
ARG PUID=1000
ARG PGID=1000
ARG PORT=8080
# =============================================================================
# Build the EteSync web client.
FROM node:12 as web
ARG ETESYNC_WEB_TAG
ADD https://github.com/etesync/etesync-web/archive/${ETESYNC_WEB_TAG}.tar.gz etesync_web.tar.gz
ENV REACT_APP_DEFAULT_API_PATH "/"
RUN mkdir -p etesync-web \
&& tar xf etesync_web.tar.gz --strip-components=1 -C etesync-web \
&& cd etesync-web \
&& yarn --network-timeout 3600000 \
&& yarn build --network-timeout 3600000
# =============================================================================
FROM python:3.8-slim
ARG ETEBASE_TAG
ARG PUID
ARG PGID
ARG PORT
ENV ETEBASE_DIRECTORY "/opt/etebase"
ENV ETEBASE_DATA_DIRECTORY "/data"
ENV ETEBASE_MEDIA_DIRECTORY "/data/media"
ENV ETEBASE_DATABASE_FILE "db.sqlite3"
ENV ETEBASE_PORT ${PORT}
# Install uWSGI.
# Unfortunately this needs a compiler, so we install one for just this step. We also install
# libpcre3 to enable internal routing in uWSGI.
RUN apt-get update \
&& apt-get install -y build-essential python3-dev libpcre3-dev \
&& pip3 install uwsgi \
&& pip3 cache purge \
&& apt-get purge -y --auto-remove build-essential python3-dev libpcre3-dev \
&& rm -rf /var/lib/apt/lists/*
# Download Etebase.
ADD https://github.com/etesync/server/archive/${ETEBASE_TAG}.tar.gz etebase.tar.gz
RUN mkdir -p ${ETEBASE_DIRECTORY} \
&& tar xf etebase.tar.gz --strip-components=1 --exclude="example-configs" -C ${ETEBASE_DIRECTORY} \
&& rm etebase.tar.gz \
&& pip3 install --no-cache-dir -r ${ETEBASE_DIRECTORY}/requirements.txt \
&& ${ETEBASE_DIRECTORY}/manage.py collectstatic
# Copy the web client from the other build stage.
COPY --from=web /etesync-web/build ${ETEBASE_DIRECTORY}/web
# Create a user as which the server will run.
RUN groupadd --gid ${PGID} etebase \
&& useradd --uid ${PUID} --gid etebase --shell /bin/bash etebase
# Copy configuration files and startup script.
COPY config/etebase_server_settings.py ${ETEBASE_DIRECTORY}/etebase_server_settings.py
COPY config/uwsgi.ini /etc/uwsgi/
COPY scripts/init.sh /
VOLUME ${ETEBASE_DATA_DIRECTORY}
EXPOSE ${ETEBASE_PORT}
USER ${PUID}:${PGID}
CMD ["/init.sh"] |
370cd46 to
4e0d2c5
Compare
These IDs have been tested and would have been current back in Dec 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This provides a number of useful features: